home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'ColorGrd.pas' rev: 3.00
-
- #ifndef ColorGrdHPP
- #define ColorGrdHPP
- #include <Menus.hpp>
- #include <ExtCtrls.hpp>
- #include <Controls.hpp>
- #include <Forms.hpp>
- #include <Graphics.hpp>
- #include <Classes.hpp>
- #include <Messages.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Colorgrd
- {
- //-- type declarations -------------------------------------------------------
- enum TGridOrdering { go16x1, go8x2, go4x4, go2x8, go1x16 };
-
- class DELPHICLASS TColorGrid;
- class PASCALIMPLEMENTATION TColorGrid : public Controls::TCustomControl
- {
- typedef Controls::TCustomControl inherited;
-
- private:
- tagPALETTEENTRY FPaletteEntries[20];
- bool FClickEnablesColor;
- int FForegroundIndex;
- int FBackgroundIndex;
- bool FForegroundEnabled;
- bool FBackgroundEnabled;
- int FSelection;
- int FCellXSize;
- int FCellYSize;
- int FNumXSquares;
- int FNumYSquares;
- TGridOrdering FGridOrdering;
- bool FHasFocus;
- Classes::TNotifyEvent FOnChange;
- TMouseButton FButton;
- bool FButtonDown;
- void __fastcall DrawSquare(int Which, bool ShowSelector);
- void __fastcall DrawFgBg(void);
- void __fastcall UpdateCellSizes(bool DoRepaint);
- void __fastcall SetGridOrdering(TGridOrdering Value);
- Graphics::TColor __fastcall GetForegroundColor(void);
- Graphics::TColor __fastcall GetBackgroundColor(void);
- void __fastcall SetForegroundIndex(int Value);
- void __fastcall SetBackgroundIndex(int Value);
- void __fastcall SetSelection(int Value);
- void __fastcall EnableForeground(bool Value);
- void __fastcall EnableBackground(bool Value);
- HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
- HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
- MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
- HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
-
- protected:
- DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
- DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
- int Y);
- DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
- DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
- Y);
- virtual void __fastcall CreateWnd(void);
- virtual void __fastcall Paint(void);
- DYNAMIC void __fastcall Change(void);
- int __fastcall SquareFromPos(int X, int Y);
-
- public:
- __fastcall virtual TColorGrid(Classes::TComponent* AOwner);
- int __fastcall ColorToIndex(Graphics::TColor AColor);
- __property Graphics::TColor ForegroundColor = {read=GetForegroundColor, nodefault};
- __property Graphics::TColor BackgroundColor = {read=GetBackgroundColor, nodefault};
-
- __published:
- __property bool ClickEnablesColor = {read=FClickEnablesColor, write=FClickEnablesColor, default=0};
-
- __property Ctl3D ;
- __property DragCursor ;
- __property DragMode ;
- __property Enabled ;
- __property TGridOrdering GridOrdering = {read=FGridOrdering, write=SetGridOrdering, default=2};
- __property int ForegroundIndex = {read=FForegroundIndex, write=SetForegroundIndex, default=0};
- __property int BackgroundIndex = {read=FBackgroundIndex, write=SetBackgroundIndex, default=0};
- __property bool ForegroundEnabled = {read=FForegroundEnabled, write=EnableForeground, default=1};
- __property bool BackgroundEnabled = {read=FBackgroundEnabled, write=EnableBackground, default=1};
- __property Font ;
- __property ParentCtl3D ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property int Selection = {read=FSelection, write=SetSelection, default=0};
- __property ShowHint ;
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- __property OnClick ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property OnStartDrag ;
- public:
- /* TCustomControl.Destroy */ __fastcall virtual ~TColorGrid(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TColorGrid(HWND ParentWindow) : Controls::TCustomControl(
- ParentWindow) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define NumPaletteEntries (Byte)(20)
-
- } /* namespace Colorgrd */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Colorgrd;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // ColorGrd
-